package com.whfc.common.enums;

/**
 * @author qzexing
 * @version 1.0
 * @date 2020-11-19 19:49
 */
public enum ObdWorkStatus {


    NORMAL(1, "正常"),

    POWER_OFF(2, "断电"),

    STOP(3, "关机");

    private Integer value;

    private String desc;

    ObdWorkStatus(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static ObdWorkStatus parseByValue(Integer value) {
        ObdWorkStatus workState = null;
        switch (value) {
            case 1:
                workState = NORMAL;
                break;
            case 2:
                workState = POWER_OFF;
                break;
            default:
                break;
        }
        return workState;
    }


}
